<HTML><HEAD><TITLE>fzn_load_stream(+ModelStream, -FznState)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(flatzinc)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>fzn_load_stream(+ModelStream, -FznState)</H1>
Load a FlatZinc model and set up its constraints
<DL>
<DT><EM>ModelStream</EM></DT>
<DD>An ECLiPSe stream name or handle
</DD>
<DT><EM>FznState</EM></DT>
<DD>a FlatZinc state descriptor
</DD>
</DL>
<H2>Description</H2>
<P>
	Load a FlatZinc model and set up its constraints.  The options
	that were used in fzn_init/2 will be taken into account.
	If fzn_load_stream/2 succeeds, all constraints have been
	successfully set up, and the search phase can begin.
    </P><P>
    	This predicate will always close ModelStream on success,
	failure or abort.
    </P>
<H3>Modes and Determinism</H3><UL>
<LI>fzn_load_stream(+, -) is semidet
</UL>
<H3>Fail Conditions</H3>
Fails if any constraint fails during setup
<H2>Examples</H2>
<PRE>
    my_fzn_run_stream(ModelStream, Options) :-
	fzn_init(Options, State),
	fzn_load_stream(ModelStream, State),
	fzn_search(State),
	fzn_output(State).
</PRE>
<H2>See Also</H2>
<A HREF="../../lib_public/flatzinc/fzn_init-2.html">fzn_init / 2</A>, <A HREF="../../lib_public/flatzinc/fzn_search-1.html">fzn_search / 1</A>, <A HREF="../../lib_public/flatzinc/fzn_output-1.html">fzn_output / 1</A>, <A HREF="../../lib_public/flatzinc/fzn_var_lookup-3.html">fzn_var_lookup / 3</A>, <A HREF="../../lib_public/flatzinc/zn_options-s.html">struct(zn_options)</A>
</BODY></HTML>
